package com.lzit.smart_canteen.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MVCconfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/user/login").setViewName("/user/login");
        registry.addViewController("/user/register").setViewName("/user/register");
        registry.addViewController("/user/registerResult").setViewName("/user/registerResult");
        registry.addViewController("/index").setViewName("/index");
        registry.addViewController("/").setViewName("/index");
        registry.addViewController("/mobile/index").setViewName("/mobile/index");
        registry.addViewController("/mobile/user").setViewName("/mobile/user");
        registry.addViewController("/mobile/cart").setViewName("/mobile/cart");
        registry.addViewController("/mobile/token").setViewName("/mobile/token");
        registry.addViewController("/mobile/menu").setViewName("/mobile/menu");
        registry.addViewController("/addOrder").setViewName("/mobile/addOrder");
        registry.addViewController("/manage").setViewName("/manage/staff_template");
        registry.addViewController("/manage/index").setViewName("/manage/index");
        registry.addViewController("/manage/cook").setViewName("/manage/cook");
        registry.addViewController("/admin").setViewName("/admin");
        registry.addViewController("/AI/index").setViewName("/AI/index");
    }
}
